﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="RegistrationCustomer.aspx.cs" Inherits="ProjectSem3.WebForm3" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
  <script type="text/javascript">
      function checkNumber1(sender, args) {
          var num = document.getElementById('<%=TextBoxPhone.ClientID %>').value;

          if (isNaN(num)) {
              args.IsValid = false;
          }
          else {

              args.IsValid = true;
          }
      }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h3>
        Registration<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
    </h3>
    <span>Note: You must input all the fields have symbol "*"</span>
  <div class="portlet">
        <div class="portlet-content nopadding">
            <table width="100%" cellpadding="0" cellspacing="0" id="box-table-a" summary="Employee Pay Sheet">
        <tr>
            <td class="style1">
                Username
            </td>
            <td>
                <asp:TextBox ID="TextBoxUsername" runat="server" Style="margin-right: 0px" Width="166px"></asp:TextBox>
                (*)<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="TextBoxUsername" ErrorMessage="Input this Box">Input this Box</asp:RequiredFieldValidator>
            </td>
            <td rowspan="11">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="style1">
                Password
            </td>
            <td>
                <asp:TextBox ID="TextBoxPassword" runat="server" Width="166px" TextMode="Password"></asp:TextBox>
                (*)<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="TextBoxPassword" ErrorMessage="Input this Box">Input this Box</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                Name
            </td>
            <td>
                <asp:TextBox ID="TextBoxName" runat="server" Width="166px"></asp:TextBox>
                (*)<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="TextBoxName" ErrorMessage="Input this Box">Input this Box</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                Date of Birth
            </td>
            <td>
                <asp:TextBox ID="TextBoxBirthday" runat="server" Height="27px" Width="166px"></asp:TextBox>
                <asp:CalendarExtender ID="TextBoxBirthday_CalendarExtender" runat="server" Enabled="True"
                    TargetControlID="TextBoxBirthday">
                </asp:CalendarExtender>
                (*)<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="TextBoxBirthday" ErrorMessage="Input this Box">Input this Box</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                Gender
            </td>
            <td>
                <asp:RadioButtonList ID="RadioButtonListGender" runat="server">
                    <asp:ListItem>Male</asp:ListItem>
                    <asp:ListItem>Female</asp:ListItem>
                </asp:RadioButtonList>
                (*)<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="RadioButtonListGender" ErrorMessage="Input this Field">Input this Box</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                Email
            </td>
            <td>
                <asp:TextBox ID="TextBoxEmail" runat="server" Width="166px"></asp:TextBox>
                (*)<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="TextBoxEmail" ErrorMessage="Input this Box">Input this Box</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                              ControlToValidate="TextBoxEmail" Display="Dynamic" 
                              ErrorMessage="RegularExpressionValidator" ForeColor="Red" 
                              ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                              ValidationGroup="1">Mail is not valid</asp:RegularExpressionValidator>
                          <asp:Label ID="lblEmailMessage" runat="server" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style1">
                Address
            </td>
            <td>
                <asp:TextBox ID="TextBoxAddress" runat="server" Width="166px"></asp:TextBox>
                (*)<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                    ControlToValidate="TextBoxAddress" ErrorMessage="Input this Box">Input this Box</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                CompanyAddress
            </td>
            <td>
                <asp:TextBox ID="TextBoxComAddress" runat="server" Width="166px"></asp:TextBox>
                (*)<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                    ControlToValidate="TextBoxComAddress" ErrorMessage="Input this Box">Input this Box</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                Phone
            </td>
            <td>
                <asp:TextBox ID="TextBoxPhone" runat="server" Width="166px"></asp:TextBox>
                (*)<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                    ControlToValidate="TextBoxPhone" ErrorMessage="Input this Box">Input this Box</asp:RequiredFieldValidator>
                      <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TextBoxPhone"
                            Display="Dynamic" ErrorMessage="CustomValidator" 
                            ClientValidationFunction="checkNumber1" ForeColor="Red" ValidationGroup="1">numberic only</asp:CustomValidator>
                        <asp:RangeValidator ID="RangeValidator1" runat="server" 
                            ControlToValidate="TextBoxPhone" Display="Dynamic" 
                            ErrorMessage="RangeValidator" ForeColor="Red" MinimumValue="0" 
                            ValidationGroup="1" MaximumValue="9999999999">11bil&gt;value&gt;0</asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                &nbsp;
            </td>
            <td>
                <asp:Button ID="ButtonSignin" runat="server" Text="Submit" OnClick="ButtonSignin_Click" />
            </td>
        </tr>
            </table>
            </div>
            </div>
</asp:Content>
